package com.tueye.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Component;

import com.tueye.base.util.BaseService;
import com.tueye.base.util.Page;
import com.tueye.dao.IAdminInfoDao;
import com.tueye.entity.Admin;
import com.tueye.service.IAdminInfoService;
import com.tueye.service.exception.TuEyeServiceException;

@Scope("prototype")
@Component("adminInfoService")
public class AdminInfoServiceImpl extends BaseService implements IAdminInfoService{
	
	@Autowired
	@Qualifier("adminInfoDao")
	private IAdminInfoDao adminInfoDao;
	
	@Override
	public Page pagedQueryByHQL(String hql, int pageNo, int pageSize,
			Object... values)throws TuEyeServiceException {
		return adminInfoDao.pagedQueryByHQL(hql, pageNo, pageSize, values);
	}
	@Override
	public void addAdmin(Admin admin) throws TuEyeServiceException {
		adminInfoDao.addAdmin(admin);
	}
	@Override
	public void delAdmin(String id) throws TuEyeServiceException {
		adminInfoDao.delAdmin(id);
		
	}
	@Override
	public Admin getAdminById(String id) throws TuEyeServiceException{
		return adminInfoDao.getAdminById(id);
	}

}
